home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 3 / ACE CD 3.iso / files / utils / hyperbo2.dms / in.adf / Macros / SaveListText{list,fname} < prev    next >
Encoding:
Text File  |  1990-09-24  |  443 b   |  22 lines

  1. /* SaveListText(list, fname)
  2.  
  3.    Create a file of the given name containing the text of the items on
  4.    the list.
  5. */
  6.  
  7. call beginprompt('Working...')
  8.  
  9. if gettype(arg(1)) ~= 'List' then do
  10.    say 'Object must be a list'
  11.    exit
  12.    end
  13.  
  14. if open(wfile,arg(2),'write') then do
  15.    do i = 1 to numelements(arg(1))
  16.       call writeln(wfile,getitemtext(objectnumber(arg(1), i)))
  17.       end
  18.    call close(wfile)
  19.    end
  20. else
  21.    say 'Couldn''t open file!'
  22.